package com.vise.facedemo.base;

import android.app.Application;


import com.zhy.http.okhttp.OkHttpUtils;

import java.util.concurrent.TimeUnit;

import okhttp3.OkHttpClient;

/**
 *
 */
public class MyApplication extends Application {

    private static Application sInstance;


    @Override
    public void onCreate() {
        super.onCreate();
        sInstance = this;
        getokhttp();

    }


    public static Application getInstance() {
        return sInstance;
    }

    public void getokhttp() {
        OkHttpClient okHttpClient = new OkHttpClient.Builder()
//                .addInterceptor(new LoggerInterceptor("TAG"))
                .connectTimeout(10000L, TimeUnit.MILLISECONDS)
                .readTimeout(10000L, TimeUnit.MILLISECONDS)
                //其他配置
                .build();

        OkHttpUtils.initClient(okHttpClient);
    }

}
